package com.aurora.oa.work.presenter;


import com.aurora.oa.listener.OnRequestLogListDataListener;
import com.aurora.oa.model.RequestHttpModel;
import com.aurora.oa.model.RequestHttpModelImpl;
import com.aurora.oa.work.bean.WorkLogDataBean;
import com.aurora.oa.work.view.WorkLogMySendActivityView;

import java.util.List;

/**
* Created by Administrator on 2017/04/18
*/

public class WorkLogMySendActivityPresenterImpl implements WorkLogMySendActivityPresenter{

    private WorkLogMySendActivityView view;
    private RequestHttpModel model;

    public WorkLogMySendActivityPresenterImpl(WorkLogMySendActivityView view){
        this.view = view;
        model = new RequestHttpModelImpl();
    }


    @Override
    public void getMySendLogByDay(String day) {

        model.getMySendWorkLogByDay(day, new OnRequestLogListDataListener() {
            @Override
            public void onRequestLogListDataSuccess(List<WorkLogDataBean> logDataList) {
                view.initList(logDataList);
            }

            @Override
            public void onRequestLogListDataFail(String message) {

            }
        });
    }
}